module View exposing (..)

import Html exposing ( Html
                     , button
                     , div
                     , h1
                     , h2
                     , hr
                     , li
                     , strong
                     , text
                     , ul
                     )
import Html.Events exposing (onClick)
import Model exposing (Model)
import Msg exposing (..)

--TODO: Remove the boilerplate example event and stat.
--      Wire up the proper +/- event to each ability score.

view : Model -> Html Msg
view model =
  div []
    [ button [ onClick Increment ] [ text "+" ]
    , div [] [ text (model.name ++ ":" ++ String.fromInt model.val) ]
    , button [ onClick Decrement ] [ text "-" ]
    , hr [] []
    , h1 [] [ text "Character Sheet"]
    , strong [] [ text model.character.name ]
    , div []
        [ h2 [] [text "Stats Misc 1"]
        , div [] [ text ("Class:" ++ "__") ]
        , div [] [ text ("Level:" ++ "__") ]
        , div [] [ text ("Race:" ++ "__") ]
        , div [] [ text ("Alignment:" ++ "__") ]
        , div [] [ text ("Player:" ++ "__") ]
        , div [] [ text ("Exp Points:" ++ "__") ]
        , div [] [ text ("Faction:" ++ "__") ]
        ]
    , div []
        [ h2 [] [text "Stats Misc 2"]
        , div [] [text ("PRO:" ++ "__") ]
        , div [] [text ("SPD:" ++ "__") ]
        , div [] [text ("INI:" ++ "__") ]
        , div [] [text ("AC:" ++ "__") ]
        , div [] [text ("HP:" ++ "cur" ++ "/MAX (tempMAX)" ++ " + temp") ]
        , div [] [text ("Hit Dice:" ++ "__") ]
        , div [] [text ("Death Saves:" ++ "__") ]
        ]
    , div []
        [ h2 [] [text "Ability Scores"]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("STR:" ++ String.fromInt model.character.abilities.str) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("DEX:" ++ String.fromInt model.character.abilities.dex) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("CON:" ++ String.fromInt model.character.abilities.con) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("INT:" ++ String.fromInt model.character.abilities.int) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("WIS:" ++ String.fromInt model.character.abilities.wis) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        , div []
            [ button [ onClick IncrementStr ] [ text "+" ]
            , div [] [ text ("CHA:" ++ String.fromInt model.character.abilities.cha) ]
            , button [ onClick DecrementStr ] [ text "-" ]
            ]
        ]
    , div []
        [ h2 [] [text "Passive Checks" ]
        , div [] [ul []
                      [ li [] [text "Perception (WIS)" ]
                      , li [] [text "Investigation (INT)" ]
                      , li [] [text "Insight (WIS)" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Saving Throws" ]
        , div [] [ul []
                      [ li [] [text "STR" ]
                      , li [] [text "DEX" ]
                      , li [] [text "CON" ]
                      , li [] [text "INT" ]
                      , li [] [text "WIS" ]
                      , li [] [text "CHA" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Skills" ]
        , div [] [ul []
                      [ li [] [text "Acrobatics (DEX)" ]
                      , li [] [text "Animal Hunting (WIS)" ]
                      , li [] [text "Arcana (INT)" ]
                      , li [] [text "Athletics (STR)" ]
                      , li [] [text "Deception (CHA)" ]
                      , li [] [text "History (INT)" ]
                      , li [] [text "Insight (WIS)" ]
                      , li [] [text "Intimidation (CHA)" ]
                      , li [] [text "Investigation (INT)" ]
                      , li [] [text "Medicine (WIS)" ]
                      , li [] [text "Nature (INT)" ]
                      , li [] [text "Perception (WIS)" ]
                      , li [] [text "Performance (CHA)" ]
                      , li [] [text "Persuation (CHA)" ]
                      , li [] [text "Religion (Int)" ]
                      , li [] [text "Sleight of Hand (DEX)" ]
                      , li [] [text "Stealth (DEX)" ]
                      , li [] [text "Survival (WIS)" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Equipment" ]
        , button [ {-TODO: Add event-} ] [ text "+" ]
        , div [] [ul []
                      [ li [] [text "Frost Skiis" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Attacks/Spells" ]
        , button [ {-TODO: Add event-} ] [ text "+" ]
        , div [] [ul []
                      [ li [] [text "Mistletoe" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Feats" ]
        , button [ {-TODO: Add event-} ] [ text "+" ]
        , div [] [ul []
                      [ li [] [text "Slippery Slope" ]
                      , li [] [text "Trap Reindeer" ]
                      , li [] [text "Find Thin Ice" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Languages" ]
        , button [ {-TODO: Add event-} ] [ text "+" ]
        , div [] [ul []
                      [ li [] [text "Oevdask" ]
                      , li [] [text "Suomi" ]
                      ]
                 ]
        ]
    , div []
        [ h2 [] [text "Contacts" ]
        , div [] [text "Allies, Enemies, Persons of Interest"]
        , button [ {-TODO: Add event-} ] [ text "+" ]
        , div [] [ul []
                      [ li [] [text "Ullur" ]
                      ]
                 ]
        ]
    ]
